package coint.btc.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import coint.btc.validator.SaveGroups;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * 

* @Description:   权限表

* @author lt  

* @date 2018年7月15日
 */
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "permission", catalog = "btc")
public class Permission implements java.io.Serializable {

	private static final long serialVersionUID = -1139809125906489448L;
	
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true)
	private Integer id;
	
	@Column(name = "name", length = 11)
	@ApiModelProperty(value = "名称")
	@NotBlank(message = "权限名称不能为空", groups = { SaveGroups.class })
	private String name;
	
	@Column(name = "mgr_id", length = 11)
	@ApiModelProperty(value = "上级id")
	@NotNull(message = "上级id不能为空", groups = { SaveGroups.class })
	private Integer mgrId;

	
	@Column(name = "biaoshi", length = 11)
	@ApiModelProperty(value = "标识")
	@NotBlank(message = "标识不能为空", groups = { SaveGroups.class })
	private String biaoshi;
	
	@Column(name = "qx_order", length = 11)
	@ApiModelProperty(value = "顺序")
	@NotNull(message = "顺序不能为空", groups = { SaveGroups.class })
	private Integer qxOrder;
	
	@Column(name = "type", length = 11)
	@ApiModelProperty(value = "1为目录, 2为菜单, 3为按钮")
	@NotNull(message = "1为目录, 2为菜单, 3为按钮,参数不能为空", groups = { SaveGroups.class })
	private Integer type;
	
	@Column(name = "qx_url")
	@ApiModelProperty(value = "权限路径")
	@NotNull(message = "权限路径不能为空", groups = { SaveGroups.class })
	private String  qxUrl;

}